package com.dnr.arch.kernel.model;

import java.lang.reflect.Field;
import java.util.Collection;

import com.dnr.arch.kernel.api.model.FieldInterface;
import com.dnr.arch.kernel.api.rules.Rule;

public class ValueField implements FieldInterface {

	private String fieldName;
	private Object fieldValue;
	private Class<?> fieldType;
	
	public ValueField(){
		fieldName= "";
		fieldValue = null;
		fieldType = Object.class;
	}
	
	public ValueField(Field field, Object fieldValue){
		this.fieldName = field.getName();
		this.fieldValue = fieldValue;
		fieldType = field.getType();
	}
	
	@Override
	public String getFieldName() {
		// TODO Auto-generated method stub
		return fieldName;
	}

	@Override
	public Object getFieldValue() {
		// TODO Auto-generated method stub
		return fieldValue;
	}

	@Override
	public Class<?> getFieldType() {
		// TODO Auto-generated method stub
		return fieldType;
	}

	@Override
	public void setFieldName(String name) {
		fieldName = name;
	}

	@Override
	public void setFiledValue(Object value) {
		fieldValue = value;
	}

	private void SetFieldType(Class<?> clazz) {
		
	}

	@Override
	public Collection<Rule> getRules() {
		// TODO Auto-generated method stub
		return null;
	}

}
